package top.hhydra.mimall.enums;

import lombok.Getter;

/**
 * @Description
 * @auther SaiyeEmon
 * @create 2020-02-09 4:38
 */
@Getter
public enum ResponseEnum {
    ERROR(-1, "服务端发生错误"),
    SUCCESS(0, "请求成功"),
    USERNAME_OR_PASSWORD_ERROR(1, "用户名或密码错误"),
    USERNAME_EXISTS(2, "用户名已存在"),
    EMAIL_EXISTS(3, "邮箱已存在"),
    PARAM_ERROR(4, "参数错误"),
    LOGIN_ERROR(5,"请先登录"),
    HAVE_NOT_PRODUCT(6,"该商品已下架或删除"),
    ADD_SHIPPING_FAIL(7,"新建地址失败"),
    DELETE_SHIPPING_FAIL(8,"删除地址失败"),
    UPDATE_SHIPPING_FAIL(9,"更新地址失败"),
    HAVE_NOT_PRODUCT_STOCK(10,"该商品已无库存");
    private Integer code;
    private String msg;

    ResponseEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
